home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / recent2 / cnet_milles.lha / Milles / CNetMilles.Update < prev    next >
Text File  |  1997-04-08  |  3KB  |  67 lines

  1. /**************************************************************************\
  2.     $VER: Mille Bornes Update, v1.18 (8-Apr-97) by Dotoran of Frontiers!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
  6. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
  7. a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
  8. parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  9.  
  10. /* NOTE: Do NOT run this file if using a version GREATER than v1.10 presently! */
  11.  
  12. tr "f1@4n1CNet Mille Bornes, Update, "ver" last modified: "vdate"n1"
  13.  
  14. se "   This update adds the `Game Speed' variable to all SAVED GAME files, "
  15. tr "as well as adding the `Amiga Plays Extension' decision...n1"
  16.  
  17. tr "   You should ONLY run this script if using v1.10 Mille Bornes!n1"
  18.  
  19. se "Continue? [No]: ";gc;a=result;if a~="Y" then do;tr "No";exit;end;else tr "Yes"
  20.  
  21. tr "list mail:users/#?/_milles(1|2|3|4|5) lformat %P%N >ram:Milles"
  22.  
  23. address command "list mail:users/#?/_milles(1|2|3|4|5) lformat %P%N >ram:Milles"
  24.  
  25. tr "n1Reading from the `ram:Milles' file created above..."
  26.  
  27. call open(f1,"ram:Milles","R")
  28.   do i=1 until eof(f1) ; t.i=readln(f1) ; end i ; t=i-1
  29. call close(f1)
  30.  
  31. if t=0 then do
  32.   tr "n1No SAVED GAMES on file..." ; exit ; end
  33.  
  34. do i=1 to t
  35.   call open(f1,t.i,"R")
  36.     do j=1 until eof(f1) ; l.j=readln(f1) ; end j ; l=j-1
  37.   call close(f1)
  38.   tr "n1Converting> "t.i
  39.   if l.1=ver then do;tr "  Already in "ver" format.";iterate;end
  40.   se "  Updating Version Number..." ; l.1=ver ; tr "Done!"
  41.   se "  Adding Game Speed Value..."
  42.     parse var l.3 v1"|"v2"|"v3"|"v4"|"v5"|"v6"|"v7"|"v8"|"v9"|"v10"|x"
  43.       l.3=v1"|"v2"|"v3"|"v4"|"v5"|"v6"|"v7"|"v8"|"v9"|"v10"|0|x" ; tr "Done!"
  44.   se "  Adding CPU Extension Decision..."
  45.     do j=l-(v8-1) to l ; parse var l.j p1"|"p2"|"p3"|"p4
  46.       l.j=p1"|"p2"|"p3"|0|"p4 ; end j ; tr "Done!"
  47.   se "  Saving..."
  48.   call open(f1,t.i,"W")
  49.     do j=1 to l ; call writeln(f1,l.j) ; end j
  50.   call close(f1) ; tr "h6ed!"
  51. end i
  52.  
  53. tr "n1Issuing this last dos command:n2delete ram:Milles"
  54.  
  55. address command "delete ram:Milles"
  56.  
  57. tr "n1Update to "ver" complete!"
  58.  
  59. exit
  60. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  61.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  62.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  63.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  64.   bufferflush
  65. /**************************************************************************\
  66. \****************************************** Frontiers BBS (716)/823-9892 **/
  67.